-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix removeInputsFromSelection to only remove inputs #2859
Conversation
…r subgraph that has key confusion
🦋 Changeset detectedLatest commit: 1ff5e3b The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for apollo-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice sleuthing!
@@ -3810,7 +3810,7 @@ describe('Fed1 supergraph handling', () => { | |||
}); | |||
|
|||
describe('Named fragments preservation', () => { | |||
it('works with nested fragments', () => { | |||
it('works with nested fragments 1', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stray?
it('works with nested fragments 1', () => { | |
it('works with nested fragments', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I had this in here is that if you try to run a test by name, jest will actually run all tests for which that name is a substring. So if you run "test1", but a "test11" and "test12" exist, it will run all three. I was trying to debug this test, and got confused because another test would run immediately afterwards, and it took me a while to realize it was a separate execution.
removeInputsFromSelection is tasked with removing inputs to a FetchGroup from the fetch group so that we don't retrieve the same values twice (and FetchGroups that don't functionally do anything can be removed). There was a bug in the code that meant that in certain cases, things that were required were actually being removed. This could manifest in subgraph jumps not being possible because the key it was using to make the jump was not available.